02. Demo: Data Cleaning

Cd13650 C5 L2 Demo 1 V2

Introduction to Cleaning Financial Data with Python

Learn the vital steps for cleaning financial data using Python to set up market indicators and a state space.

Steps Involved:

  1. Data Importation:

    • Utilize libraries for data handling.
    • Import data from CSV files; Google stock data used as an example.
  2. Data Examination:

    • Review original data with columns like date, open, high, low, close, adjusted close, and volume.
  3. Indexing by Date:

    • Index the dataset by the date to avoid lookahead biases.
  4. Data Visualization:

    • Plot data to identify anomalies or gaps.
  5. Identifying and Cleaning Missing Data:

    • Count missing values with Pandas.
    • Address gaps using "forward fill," maintaining accuracy without introducing future bias.
  6. Final Data Check:

    • Confirm the absence of null values in the cleaned dataset.

Understanding these steps ensures data integrity and prepares you for sophisticated financial analysis. After cleaning the data, the course will proceed to feature definition.